package 线程安全问题.关于synchronized.银行账户模拟.Test02;

public class AccountThread implements Runnable {
    private Account act;

    public AccountThread(Account act) {
        this.act = act;
    }

    @Override
    public void run() {
        double money = 5000;
        act.withdraw(money);
        System.out.println("账户：" + act.getActno() + "取款成功,余额：" + act.getBalance());
    }
}
